package com.xiaowan.model.user;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * 实现功能：个人信息
 *
 * @author 作者[admin]
 * @version 1.0.00 2023-04-07 10:46
 */
@Data
@TableName("personal_info")
public class PersonalInfo implements Serializable {
    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    /**
     * 修改时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;

    /*
     * 联系方式
     * */
    @TableField("mphone")
    private String mphone;

    /**
     * 姓名
     */
    @TableField("name")
    private String name;

    /**
     * 性别 1:男 2:女
     */
    @TableField("gender")
    private Integer gender;

    /**
     * 出生日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @TableField("birthday")
    private Date birthday;

    /*
     * 年龄
     * */
    @TableField("age")
    private Integer age;

    /**
     * 详细地址
     */
    @TableField("address")
    private String address;

    /**
     * 婚姻状态 1:已婚 2:未婚
     */
    @TableField("maritalStatus")
    private Integer maritalStatus;

    /**
     * address 省id
     */
    @TableField("provinceId")
    private Integer provinceId;

    /**
     * address 市id
     */
    @TableField("townId")
    private Integer townId;

    /**
     * address 县id
     */
    @TableField("countyId")
    private Integer countyId;

    /**
     * address 省地址
     */
    @TableField("provinceAddress")
    private String provinceAddress;

    /**
     * address 市地址
     */
    @TableField("townAddress")
    private String townAddress;

    /**
     * address 县地址
     */
    @TableField("countyAddress")
    private String countyAddress;

}
